import React, {useEffect, useState} from "react";

export const Test = () => {
    let [a,set]=useState(0)
    let [b,setB]=useState(0)
    let c=0
    useEffect(() => {
        setB(b+1)
    }, [c]);
    return (
        <div>
            <div
                onClick={() => set(a + 1)}
            >
                a{a}
            </div>
            <div
                onClick={() => setB(b+ 1)}
            >
                b{b}
            </div>
            <div onClick={()=>c+=1}>c</div>
        </div>

    )

}